﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SSRSViewer
{
    partial class IntegerParameterUserControl : UserControl, IParameterEditor
    {
        public IntegerParameterUserControl()
        {
            InitializeComponent();
        }

        #region IParameterEditor Members

        public object EditValue
        {
            get { return Convert.ToInt32(editor.Value); }
            set
            {
                if (value is int)
                    editor.Value = Convert.ToInt32(value);
                else
                    throw new InvalidCastException("Looking for a value of type 'Int'");
            }
        }
        public string Prompt
        {
            get { return lbPrompt.Text; }
            set { lbPrompt.Text = value; }
        }
        public RdlReportParameter EditingParameter { get; set; }
        #endregion
    }
}
